package com.bdqn.t382.entity;

import com.bdqn.t382.dao.InkDao;
import org.springframework.beans.factory.annotation.Autowired;

public class Printer {
    private InkDao inkDao;
    private Paper paper;

    public InkDao getInkDao() {
        return inkDao;
    }

    public void setInkDao(InkDao inkDao) {
        this.inkDao = inkDao;
    }

    public Paper getPaper() {
        return paper;
    }

    public void setPaper(Paper paper) {
        this.paper = paper;
    }

    public Printer(InkDao inkDao, Paper paper) {
        this.inkDao = inkDao;
        this.paper = paper;
    }

    public void print(String content) {
        System.out.println("使用 " + inkDao.getColor() + " 墨盒，在 " + paper.getSize() + " 纸张上打印内容：" + content);
    }
}
